/***************************URI类型**************************/
String.prototype.toUri = function () {
  return new Uri(this);
};

var Uri = (function () {
  function Uri(uriString) {
    uriString = uriString || window.location.href;
    if (!uriString.startsWith("http://") && !uriString.startsWith("https://"))
      uriString = `${window.location.origin}/${uriString.trim("/")}`;
    if (typeof uriString != "string" || !uriString.isUrl()) {
      return null;
    }

    var segments = uriString.split("#");
    var fullpathSegments = segments[0].split("?");
    var schemaSegments = fullpathSegments[0].split("://");
    this.protocal = schemaSegments[0];

    var pathSegments = schemaSegments[1].split("/");
    var hostSegments = pathSegments[0].split(":");
    this.host = hostSegments[0];
    this.port = hostSegments[1] || "";
    this.portNumber = 0;
    if (this.port) {
      this.portNumber = Number(this.port);
    } else {
      switch (this.protocal.toLowerCase()) {
        case "ftp":
          this.portNumber = 21;
          break;
        case "https":
          this.portNumber = 443;
          break;
        case "http":
        default:
          this.portNumber = 80;
          break;
      }
    }

    pathSegments.remove(pathSegments[0]);
    this.path =
      pathSegments && pathSegments.length > 0
        ? "/" + pathSegments.join("/")
        : "";
    this.search = fullpathSegments[1];
    this.hash = segments[1];
    this.params = {};
    if (this.search) {
      var parArray = this.search.split("&");
      for (var i = 0; i < parArray.length; i++) {
        var arr = parArray[i].split("=");
        var name = arr[0];
        var val = arr[1] || "";
        this.params[name] = val.urlDecode();
      }
    }
  }
  /**
   * 为uri对象添加query参数
   * @param {String} name 参数名
   * @param {any} value 参数值(无需Url编码)
   */
  Uri.prototype.addParam = function (name, value) {
    this.params = this.params || {};
    this.params[name] = value;
  };
  /**
   * 为uri对象添加query参数
   * @param {any} dictionary 参数键值对(无需Url编码)
   */
  Uri.prototype.addParams = function (dictionary) {
    for (var name in dictionary) {
      this.addParam(name, dictionary[name]);
    }
  };
  /**
   * 为uri对象移除指定的query参数
   * @param {String} name 参数名
   */
  Uri.prototype.remove = function (name) {
    if (this.params) delete this.params[name];
  };
  /**
   * 将Uri对象转换为String，转换过程中将对Query参数值执行Url编码
   * @returns
   */
  Uri.prototype.toString = function () {
    if (this.params) {
      var params = [];
      for (var name in this.params) {
        var val = this.params[name];
        params.push(name + "=" + val.toString().urlEncode());
      }
      this.search = params.join("&");
    }
    return (
      this.protocal +
      "://" +
      this.host +
      (this.port ? ":" + this.port : "") +
      (this.path ? this.path : "") +
      (this.search ? "?" + this.search : "") +
      (this.hash ? "#" + this.hash : "")
    );
  };

  return Uri;
})();

/***************************URI类型 end *******************/

/*************************** Task **************************/
var Task = (function () {
  function Task(name, options) {
    this.name = name;
    //this.url = options.url;
    //this.method = options.method;
    //this.postData = options.postData;
    this.context = options.context || this;
    this.arguments = options.arguments || {};
    this.promise = options.promise;
    this.onAction = options.onAction;
    this.onError = options.onError;
    this.once = options.once || false; //一次性的
    this.retryTimes = options.retryTimes; //重试次数
    this.interval = options.interval; //重复间隔
    this.delay = options.delay || 0; //延时多少秒开始
    this.retried = this.retryTimes;
    this.running = false;
  }

  Task.prototype.polling = function () {
    if (!this.running) return;

    if (this.promise && typeof this.promise === "function") {
      var callee;
      if (this.promise.length > 1) {
        if (this.arguments instanceof Array)
          callee = this.promise.apply(this, this.arguments);
        else callee = this.promise(this.arguments);
      } else {
        callee = this.promise(this.arguments);
      }
      callee
        .then(
          (function (task) {
            return function () {
              if (task.retried < 3) task.retried = 3;
              if (typeof task.onAction === "function")
                task.onAction.apply(task.context, arguments);
              if (task.once) {
                task.running = false;
                return;
              }
              var func = debounce(task.polling, task.interval);
              func.apply(task);
            };
          })(this)
        )
        .catch(
          (function (task) {
            return function () {
              if (typeof task.onError === "function")
                task.onError.apply(task, arguments);
              if (task.retried > 0) {
                var func = debounce(task.polling, task.interval);
                func.apply(task);
                task.retried--;
              } else {
                task.running = false;
              }
            };
          })(this)
        );
    } else {
      try {
        if (this.retried < 3) this.retried = 3;
        if (typeof this.onAction === "function")
          this.onAction.apply(this.context, this.arguments);
        if (this.once) {
          this.running = false;
          return;
        }
        debounce(this.polling, this.interval).apply(this);
      } catch (e) {
        if (typeof this.onError === "function")
          this.onError.apply(this.context, e);
        if (this.retried > 0) {
          debounce(this.polling, this.interval).apply(this);
          this.retried--;
        } else {
          this.running = false;
        }
      }
    }
  };

  Task.prototype.start = function (delay) {
    this.retried = this.retryTimes;
    this.running = true;
    if (delay && delay > 0) debounce(this.polling, delay).apply(this);
    else if (this.delay > 0) debounce(this.polling, this.delay).apply(this);
    else this.polling();
  };

  Task.prototype.stop = function () {
    this.running = false;
    this.retried = 0;
  };

  Task.prototype.restart = function () {
    this.stop();
    this.start();
  };

  return Task;
})();

var TaskPool = (function () {
  function TaskPool(options) {
    this.defaults = {
      retryTimes: 3,
      delay: 0,
      interval: 5000,
      method: "get",
    };
    this.options = Object.assign(options || {}, this.defaults);

    this.taskList = {};
  }

  TaskPool.prototype.allStart = function () {
    for (var name in this.taskList) {
      this.taskList[name].start();
    }
  };

  TaskPool.prototype.addTask = function (task, autoStart) {
    this.taskList[task.name] = task;

    task.retryTimes = task.retryTimes || this.options.retryTimes;
    task.interval = task.interval || this.options.interval;
    task.method = task.method || this.options.method;
    task.delay = task.delay || this.options.delay;
    if (autoStart) task.start();
  };

  TaskPool.prototype.deleteTask = function (name) {
    this.taskList[name].stop();
    delete this.taskList[name];
  };

  TaskPool.prototype.getTask = function (name) {
    return this.taskList[name];
  };

  return TaskPool;
})();

/*************************** Task end **************************/

/*************************** Agent begin **************************/

var Agent = (function () {
  function Agent(domain, objectName) {
    this.domain =
      domain || window.location.protocol + "//" + window.location.host;
    this.objectName = objectName;
  }

  Agent.prototype.sendMessage = function (methodName, params) {
    var data = {
      objectName: this.objectName,
      methodName: methodName,
      arguments: params,
    };
    window.parent.postMessage(data, this.domain);
  };
  return Agent;
})();
/*************************** Agent end **************************/

/*************************** useful functions begin **************************/
function debounce(callback, delay) {
  var timer;
  return function () {
    if (timer) clearTimeout(timer);
    var context = this;
    var args = arguments;
    timer = setTimeout(function () {
      callback.apply(context, args);
    }, delay);
  };
}

function throttle(callback, delay) {
  var last = 0;
  return function () {
    var now = new Date();
    if (now - last > delay) {
      callback.apply(this, arguments);
      last = now;
    }
  };
}

function observer(obj, propertyName, value, onPropertyChange) {
  Object.defineProperty(obj, propertyName, {
    configurable: true,
    get: function () {
      return value;
    },
    set: function (newVal) {
      var proceed = true;
      var oldVal = value;
      value = newVal;
      if (
        oldVal !== newVal &&
        onPropertyChange &&
        typeof onPropertyChange == "function"
      ) {
        proceed = onPropertyChange.apply(obj, [oldVal, newVal]);
      }
      if (proceed === false)
        //明确cancel值
        value = oldVal;
    },
  });
}

function resolveFullPath(path) {
  if (typeof path != "string") return null;
  if (
    path &&
    (path.indexOf("http://") === 0 || path.indexOf("https://") === 0)
  ) {
    return path;
  }

  var fullHost = window.location.protocol + "//" + window.location.host;
  if (path && path.indexOf("/") === 0) {
    return fullHost + path;
  }
  var absolutePath = fullHost + window.location.pathname;
  var reg = new RegExp("\\.\\./", "g");
  var uplayCount = 0;
  var m = path.match(reg);
  if (m) uplayCount = m.length;

  var lastIndex = absolutePath.length - 1;
  var subString = absolutePath.substr(0, lastIndex + 1);
  for (var i = 0; i <= uplayCount; i++) {
    lastIndex = subString.lastIndexOf("/", lastIndex);
    subString = subString.substr(0, lastIndex);
  }
  return subString + "/" + path.replace(reg, "");
}

function createGUID() {
  var now = new Date();
  var d = now.getTime();
  var id = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
    /[xy]/g,
    function (c) {
      var r = (d + Math.random() * 16) % 16 | 0;
      d = Math.floor(d / 16);
      return (c == "x" ? r : (r & 0x3) | 0x8).toString(16);
    }
  );
  return id;
}

function createSequenceID() {
  var id = createGUID();
  var now = new Date();
  return now.format("yyyyMMddHHmmss") + id.replace(/-/gi, "").toUpperCase();
}

/*************************** useful functions end **************************/
var icons = [
  "fa fa-address-book",
  "fa fa-address-book-o",
  "fa fa-address-card",
  "fa fa-address-card-o",
  "fa fa-adjust",
  "fa fa-ambulance",
  "fa fa-american-sign-language-interpreting",
  "fa fa-anchor",
  "fa fa-archive",
  "fa fa-area-chart",
  "fa fa-arrows",
  "fa fa-arrows-h",
  "fa fa-arrows-v",
  "fa fa-asl-interpreting",
  "fa fa-assistive-listening-systems",
  "fa fa-asterisk",
  "fa fa-at",
  "fa fa-audio-description",
  "fa fa-automobile",
  "fa fa-balance-scale",
  "fa fa-ban",
  "fa fa-bank",
  "fa fa-bar-chart",
  "fa fa-barcode",
  "fa fa-bars",
  "fa fa-bath",
  "fa fa-battery",
  "fa fa-battery-empty",
  "fa fa-battery-full",
  "fa fa-battery-half",
  "fa fa-battery-quarter",
  "fa fa-battery-three-quarters",
  "fa fa-bed",
  "fa fa-beer",
  "fa fa-bell",
  "fa fa-bell-o",
  "fa fa-bell-slash",
  "fa fa-bell-slash-o",
  "fa fa-bicycle",
  "fa fa-binoculars",
  "fa fa-birthday-cake",
  "fa fa-blind",
  "fa fa-bluetooth",
  "fa fa-bluetooth-b",
  "fa fa-bolt",
  "fa fa-bomb",
  "fa fa-book",
  "fa fa-bookmark",
  "fa fa-bookmark-o",
  "fa fa-braille",
  "fa fa-briefcase",
  "fa fa-bug",
  "fa fa-building",
  "fa fa-building-o",
  "fa fa-bullhorn",
  "fa fa-bullseye",
  "fa fa-bus",
  "fa fa-cab",
  "fa fa-calculator",
  "fa fa-calendar",
  "fa fa-calendar-check-o",
  "fa fa-calendar-minus-o",
  "fa fa-calendar-o",
  "fa fa-calendar-plus-o",
  "fa fa-calendar-times-o",
  "fa fa-camera",
  "fa fa-camera-retro",
  "fa fa-car",
  "fa fa-caret-square-o-down",
  "fa fa-caret-square-o-left",
  "fa fa-caret-square-o-right",
  "fa fa-caret-square-o-up",
  "fa fa-cart-arrow-down",
  "fa fa-cart-plus",
  "fa fa-cc",
  "fa fa-certificate",
  "fa fa-check",
  "fa fa-check-circle",
  "fa fa-check-circle-o",
  "fa fa-check-square",
  "fa fa-check-square-o",
  "fa fa-child",
  "fa fa-circle",
  "fa fa-circle-o",
  "fa fa-circle-o-notch",
  "fa fa-circle-thin",
  "fa fa-clock-o",
  "fa fa-clone",
  "fa fa-close",
  "fa fa-cloud",
  "fa fa-cloud-download",
  "fa fa-cloud-upload",
  "fa fa-code",
  "fa fa-code-fork",
  "fa fa-coffee",
  "fa fa-cog",
  "fa fa-cogs",
  "fa fa-comment",
  "fa fa-comment-o",
  "fa fa-commenting",
  "fa fa-commenting-o",
  "fa fa-comments",
  "fa fa-comments-o",
  "fa fa-compass",
  "fa fa-copyright",
  "fa fa-creative-commons",
  "fa fa-credit-card",
  "fa fa-credit-card-alt",
  "fa fa-crop",
  "fa fa-crosshairs",
  "fa fa-cube",
  "fa fa-cubes",
  "fa fa-cutlery",
  "fa fa-dashboard",
  "fa fa-database",
  "fa fa-deaf",
  "fa fa-desktop",
  "fa fa-diamond",
  "fa fa-dot-circle-o",
  "fa fa-download",
  "fa fa-drivers-license",
  "fa fa-drivers-license-o",
  "fa fa-edit",
  "fa fa-ellipsis-h",
  "fa fa-ellipsis-v",
  "fa fa-envelope",
  "fa fa-envelope-o",
  "fa fa-envelope-open",
  "fa fa-envelope-open-o",
  "fa fa-envelope-square",
  "fa fa-eraser",
  "fa fa-exchange",
  "fa fa-exclamation",
  "fa fa-exclamation-circle",
  "fa fa-exclamation-triangle",
  "fa fa-external-link",
  "fa fa-external-link-square",
  "fa fa-eye",
  "fa fa-eye-slash",
  "fa fa-eyedropper",
  "fa fa-fax",
  "fa fa-feed",
  "fa fa-female",
  "fa fa-fighter-jet",
  "fa fa-file-audio-o",
  "fa fa-file-code-o",
  "fa fa-file-excel-o",
  "fa fa-file-image-o",
  "fa fa-file-pdf-o",
  "fa fa-file-powerpoint-o",
  "fa fa-file-video-o",
  "fa fa-file-word-o",
  "fa fa-file-zip-o",
  "fa fa-film",
  "fa fa-filter",
  "fa fa-fire",
  "fa fa-fire-extinguisher",
  "fa fa-flag",
  "fa fa-flag-checkered",
  "fa fa-flag-o",
  "fa fa-flash",
  "fa fa-flask",
  "fa fa-folder",
  "fa fa-folder-o",
  "fa fa-folder-open",
  "fa fa-folder-open-o",
  "fa fa-frown-o",
  "fa fa-futbol-o",
  "fa fa-gamepad",
  "fa fa-gavel",
  "fa fa-gear",
  "fa fa-gears",
  "fa fa-gift",
  "fa fa-glass",
  "fa fa-globe",
  "fa fa-graduation-cap",
  "fa fa-group",
  "fa fa-hand-lizard-o",
  "fa fa-hand-peace-o",
  "fa fa-hand-pointer-o",
  "fa fa-hand-rock-o",
  "fa fa-hand-scissors-o",
  "fa fa-hand-spock-o",
  "fa fa-hand-stop-o",
  "fa fa-handshake-o",
  "fa fa-hard-of-hearing",
  "fa fa-hashtag",
  "fa fa-hdd-o",
  "fa fa-headphones",
  "fa fa-heart",
  "fa fa-heart-o",
  "fa fa-heartbeat",
  "fa fa-history",
  "fa fa-home",
  "fa fa-hotel",
  "fa fa-hourglass",
  "fa fa-hourglass-end",
  "fa fa-hourglass-half",
  "fa fa-hourglass-o",
  "fa fa-hourglass-start",
  "fa fa-i-cursor",
  "fa fa-id-badge",
  "fa fa-id-card",
  "fa fa-id-card-o",
  "fa fa-inbox",
  "fa fa-industry",
  "fa fa-info",
  "fa fa-info-circle",
  "fa fa-institution",
  "fa fa-key",
  "fa fa-keyboard-o",
  "fa fa-language",
  "fa fa-laptop",
  "fa fa-leaf",
  "fa fa-legal",
  "fa fa-lemon-o",
  "fa fa-level-down",
  "fa fa-level-up",
  "fa fa-life-saver",
  "fa fa-lightbulb-o",
  "fa fa-line-chart",
  "fa fa-location-arrow",
  "fa fa-lock",
  "fa fa-low-vision",
  "fa fa-magic",
  "fa fa-magnet",
  "fa fa-mail-forward",
  "fa fa-mail-reply",
  "fa fa-mail-reply-all",
  "fa fa-male",
  "fa fa-map",
  "fa fa-map-marker",
  "fa fa-map-o",
  "fa fa-map-pin",
  "fa fa-map-signs",
  "fa fa-meh-o",
  "fa fa-microchip",
  "fa fa-microphone",
  "fa fa-microphone-slash",
  "fa fa-minus",
  "fa fa-minus-circle",
  "fa fa-minus-square",
  "fa fa-minus-square-o",
  "fa fa-mobile",
  "fa fa-money",
  "fa fa-moon-o",
  "fa fa-mortar-board",
  "fa fa-motorcycle",
  "fa fa-mouse-pointer",
  "fa fa-music",
  "fa fa-newspaper-o",
  "fa fa-object-group",
  "fa fa-object-ungroup",
  "fa fa-paint-brush",
  "fa fa-paw",
  "fa fa-pencil",
  "fa fa-pencil-square",
  "fa fa-pencil-square-o",
  "fa fa-percent",
  "fa fa-phone",
  "fa fa-phone-square",
  "fa fa-photo",
  "fa fa-pie-chart",
  "fa fa-plane",
  "fa fa-plug",
  "fa fa-plus",
  "fa fa-plus-circle",
  "fa fa-plus-square",
  "fa fa-plus-square-o",
  "fa fa-podcast",
  "fa fa-power-off",
  "fa fa-print",
  "fa fa-puzzle-piece",
  "fa fa-qrcode",
  "fa fa-question",
  "fa fa-question-circle",
  "fa fa-question-circle-o",
  "fa fa-quote-left",
  "fa fa-quote-right",
  "fa fa-random",
  "fa fa-recycle",
  "fa fa-refresh",
  "fa fa-registered",
  "fa fa-remove",
  "fa fa-reply",
  "fa fa-reply-all",
  "fa fa-retweet",
  "fa fa-road",
  "fa fa-rocket",
  "fa fa-rss",
  "fa fa-rss-square",
  "fa fa-s15",
  "fa fa-search",
  "fa fa-search-minus",
  "fa fa-search-plus",
  "fa fa-send",
  "fa fa-send-o",
  "fa fa-server",
  "fa fa-share",
  "fa fa-share-alt",
  "fa fa-share-alt-square",
  "fa fa-share-square",
  "fa fa-share-square-o",
  "fa fa-shield",
  "fa fa-ship",
  "fa fa-shopping-bag",
  "fa fa-shopping-basket",
  "fa fa-shopping-cart",
  "fa fa-shower",
  "fa fa-sign-in",
  "fa fa-sign-language",
  "fa fa-sign-out",
  "fa fa-signal",
  "fa fa-signing",
  "fa fa-sitemap",
  "fa fa-sliders",
  "fa fa-smile-o",
  "fa fa-snowflake-o",
  "fa fa-soccer-ball-o",
  "fa fa-sort",
  "fa fa-sort-alpha-asc",
  "fa fa-sort-alpha-desc",
  "fa fa-sort-amount-asc",
  "fa fa-sort-amount-desc",
  "fa fa-sort-asc",
  "fa fa-sort-desc",
  "fa fa-sort-numeric-asc",
  "fa fa-sort-numeric-desc",
  "fa fa-space-shuttle",
  "fa fa-spinner",
  "fa fa-spoon",
  "fa fa-square",
  "fa fa-square-o",
  "fa fa-star",
  "fa fa-star-half",
  "fa fa-star-half-o",
  "fa fa-star-o",
  "fa fa-sticky-note",
  "fa fa-sticky-note-o",
  "fa fa-street-view",
  "fa fa-subway",
  "fa fa-suitcase",
  "fa fa-sun-o",
  "fa fa-support",
  "fa fa-tablet",
  "fa fa-tachometer",
  "fa fa-tag",
  "fa fa-tags",
  "fa fa-tasks",
  "fa fa-taxi",
  "fa fa-television",
  "fa fa-terminal",
  "fa fa-thermometer",
  "fa fa-thermometer-0",
  "fa fa-thermometer-1",
  "fa fa-thermometer-2",
  "fa fa-thermometer-3",
  "fa fa-thermometer-4",
  "fa fa-thermometer-empty",
  "fa fa-thermometer-full",
  "fa fa-thermometer-half",
  "fa fa-thermometer-quarter",
  "fa fa-thermometer-three-quarters",
  "fa fa-thumb-tack",
  "fa fa-thumbs-down",
  "fa fa-thumbs-o-down",
  "fa fa-thumbs-o-up",
  "fa fa-thumbs-up",
  "fa fa-ticket",
  "fa fa-times",
  "fa fa-times-circle",
  "fa fa-times-circle-o",
  "fa fa-times-rectangle",
  "fa fa-times-rectangle-o",
  "fa fa-tint",
  "fa fa-toggle-down",
  "fa fa-toggle-left",
  "fa fa-toggle-off",
  "fa fa-toggle-on",
  "fa fa-toggle-right",
  "fa fa-toggle-up",
  "fa fa-trademark",
  "fa fa-train",
  "fa fa-trash",
  "fa fa-trash-o",
  "fa fa-tree",
  "fa fa-trophy",
  "fa fa-truck",
  "fa fa-tty",
  "fa fa-tv",
  "fa fa-umbrella",
  "fa fa-universal-access",
  "fa fa-university",
  "fa fa-unlock",
  "fa fa-unlock-alt",
  "fa fa-unsorted",
  "fa fa-upload",
  "fa fa-user",
  "fa fa-user-circle",
  "fa fa-user-circle-o",
  "fa fa-user-o",
  "fa fa-user-plus",
  "fa fa-user-secret",
  "fa fa-user-times",
  "fa fa-users",
  "fa fa-vcard",
  "fa fa-vcard-o",
  "fa fa-video-camera",
  "fa fa-volume-control-phone",
  "fa fa-volume-down",
  "fa fa-volume-off",
  "fa fa-volume-up",
  "fa fa-warning",
  "fa fa-wheelchair",
  "fa fa-wheelchair-alt",
  "fa fa-wifi",
  "fa fa-window-close",
  "fa fa-window-close-o",
  "fa fa-window-maximize",
  "fa fa-window-minimize",
  "fa fa-window-restore",
  "fa fa-wrench",
  "fa fa-align-center",
  "fa fa-align-justify",
  "fa fa-align-left",
  "fa fa-align-right",
  "fa fa-bold",
  "fa fa-chain",
  "fa fa-chain-broken",
  "fa fa-clipboard",
  "fa fa-columns",
  "fa fa-copy",
  "fa fa-cut",
  "fa fa-dedent",
  "fa fa-file",
  "fa fa-file-o",
  "fa fa-file-text",
  "fa fa-file-text-o",
  "fa fa-files-o",
  "fa fa-floppy-o",
  "fa fa-font",
  "fa fa-header",
  "fa fa-indent",
  "fa fa-italic",
  "fa fa-link",
  "fa fa-list",
  "fa fa-list-alt",
  "fa fa-list-ol",
  "fa fa-list-ul",
  "fa fa-outdent",
  "fa fa-paperclip",
  "fa fa-paragraph",
  "fa fa-paste",
  "fa fa-repeat",
  "fa fa-rotate-left",
  "fa fa-rotate-right",
  "fa fa-save",
  "fa fa-scissors",
  "fa fa-strikethrough",
  "fa fa-subscript",
  "fa fa-superscript",
  "fa fa-table",
  "fa fa-text-height",
  "fa fa-text-width",
  "fa fa-th",
  "fa fa-th-large",
  "fa fa-th-list",
  "fa fa-underline",
  "fa fa-undo",
  "fa fa-unlink",
];

function moveUp(array, item) {
  debugger;
  var index = array.indexOf(item);
  if (index <= 0 || index >= array.length) return;
  var targetIndex = index - 1;
  var temp = array[targetIndex];
  array[targetIndex] = item;
  array[index] = temp;
}
function moveDown(array, item) {
  var index = array.indexOf(item);
  if (index < 0 || index >= array.length - 1) return;
  var targetIndex = index + 1;
  var temp = array[targetIndex];
  array[targetIndex] = item;
  array[index] = temp;
}

export default {
  createGUID: createGUID,
  createSequenceID: createSequenceID,
  resolveFullPath: resolveFullPath,
  debounce: debounce,
  throttle: throttle,
  observer: observer,
  icons: icons,
  Agent: Agent,
  Uri: Uri,
  TaskPool: TaskPool,
  Task: Task,
  moveUp: moveUp,
  moveDown: moveDown,
};
